package day02.override;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/17
 */
public class Director extends Employee {
    private double trafficAllowance;  // 交通补助
    public Director(String name, String address, double salary, double trafficAllowance) {
        super(name, address, salary);
        this.trafficAllowance = trafficAllowance;
    }

    public double getTrafficAllowance() {
        return trafficAllowance;
    }

    public void setTrafficAllowance(double trafficAllowance) {
        this.trafficAllowance = trafficAllowance;
    }

    @Override
    public void show() {
        System.out.println("董事基本信息");
        System.out.println("姓名：" + getName());
        System.out.println("地址：" + getAddress());
        System.out.println("基本工资：" + getsalary());
        System.out.println("交通补助：" + trafficAllowance);
    }
}

